function gamma_dB=pdrToGamma (pdr, length)
global f R B_N;
Gauss_x = 1 - realpow(pdr, 1/(64*length));

gamma_DS = R * realpow (2*B_N, -1) * realpow(norminv(Gauss_x,0,1), 2);

%gamma = gamma_DS/4.5;
gamma = gamma_DS;
gamma_dB = 10 * log10(gamma);
end